<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Arrays and Array-style COM properties</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="com.examples.foreach.html">« For Each</a></li>
      <li style="float: right;"><a href="class.com.html">com »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="com.examples.html">范例</a></li>
    <li>Arrays and Array-style COM properties</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="com.examples.arrays" class="section">
  <h2 class="title">Arrays and Array-style COM properties</h2>
  <p class="para">
   Many COM objects expose their properties as arrays, or using array-style
   access.
  </p>
  <p class="para">
   You can:
   <ul class="itemizedlist">
    <li class="listitem">
     <p class="para">
      Access multi-dimensional arrays, or COM properties that require
      multiple parameters using PHP array syntax.  You can also write or set
      properties using this technique.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Iterate SafeArrays (&quot;true&quot; arrays) using the <a href="control-structures.foreach.html" class="link">foreach</a> control structure.  
      This works because SafeArrays include information about their size.  If an
      array-style property implements IEnumVariant then you can also use
      foreach for that property too; take a look at <a href="com.examples.foreach.html" class="xref">For Each</a> for more information on this topic.
     </p>
    </li>
   </ul>
  </p>
 </div></div></div></body></html>